// Code generated by MockGen. DO NOT EDIT.
// Source: ./pkg/pool/pool.go

// Package mock is a generated GoMock package.
package mock

import (
	reflect "reflect"

	gomock "github.com/golang/mock/gomock"
	config "github.com/pg-sharding/spqr/pkg/config"
	kr "github.com/pg-sharding/spqr/pkg/models/kr"
	pool "github.com/pg-sharding/spqr/pkg/pool"
	shard "github.com/pg-sharding/spqr/pkg/shard"
)

// MockConnectionKepper is a mock of ConnectionKepper interface.
type MockConnectionKepper struct {
	ctrl     *gomock.Controller
	recorder *MockConnectionKepperMockRecorder
}

// MockConnectionKepperMockRecorder is the mock recorder for MockConnectionKepper.
type MockConnectionKepperMockRecorder struct {
	mock *MockConnectionKepper
}

// NewMockConnectionKepper creates a new mock instance.
func NewMockConnectionKepper(ctrl *gomock.Controller) *MockConnectionKepper {
	mock := &MockConnectionKepper{ctrl: ctrl}
	mock.recorder = &MockConnectionKepperMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockConnectionKepper) EXPECT() *MockConnectionKepperMockRecorder {
	return m.recorder
}

// Discard mocks base method.
func (m *MockConnectionKepper) Discard(sh shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Discard", sh)
	ret0, _ := ret[0].(error)
	return ret0
}

// Discard indicates an expected call of Discard.
func (mr *MockConnectionKepperMockRecorder) Discard(sh interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockConnectionKepper)(nil).Discard), sh)
}

// Hostname mocks base method.
func (m *MockConnectionKepper) Hostname() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Hostname")
	ret0, _ := ret[0].(string)
	return ret0
}

// Hostname indicates an expected call of Hostname.
func (mr *MockConnectionKepperMockRecorder) Hostname() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hostname", reflect.TypeOf((*MockConnectionKepper)(nil).Hostname))
}

// IdleConnectionCount mocks base method.
func (m *MockConnectionKepper) IdleConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IdleConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// IdleConnectionCount indicates an expected call of IdleConnectionCount.
func (mr *MockConnectionKepperMockRecorder) IdleConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdleConnectionCount", reflect.TypeOf((*MockConnectionKepper)(nil).IdleConnectionCount))
}

// List mocks base method.
func (m *MockConnectionKepper) List() []shard.Shard {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "List")
	ret0, _ := ret[0].([]shard.Shard)
	return ret0
}

// List indicates an expected call of List.
func (mr *MockConnectionKepperMockRecorder) List() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockConnectionKepper)(nil).List))
}

// Put mocks base method.
func (m *MockConnectionKepper) Put(host shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Put", host)
	ret0, _ := ret[0].(error)
	return ret0
}

// Put indicates an expected call of Put.
func (mr *MockConnectionKepperMockRecorder) Put(host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockConnectionKepper)(nil).Put), host)
}

// QueueResidualSize mocks base method.
func (m *MockConnectionKepper) QueueResidualSize() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "QueueResidualSize")
	ret0, _ := ret[0].(int)
	return ret0
}

// QueueResidualSize indicates an expected call of QueueResidualSize.
func (mr *MockConnectionKepperMockRecorder) QueueResidualSize() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueResidualSize", reflect.TypeOf((*MockConnectionKepper)(nil).QueueResidualSize))
}

// RouterName mocks base method.
func (m *MockConnectionKepper) RouterName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RouterName")
	ret0, _ := ret[0].(string)
	return ret0
}

// RouterName indicates an expected call of RouterName.
func (mr *MockConnectionKepperMockRecorder) RouterName() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouterName", reflect.TypeOf((*MockConnectionKepper)(nil).RouterName))
}

// Rule mocks base method.
func (m *MockConnectionKepper) Rule() *config.BackendRule {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Rule")
	ret0, _ := ret[0].(*config.BackendRule)
	return ret0
}

// Rule indicates an expected call of Rule.
func (mr *MockConnectionKepperMockRecorder) Rule() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rule", reflect.TypeOf((*MockConnectionKepper)(nil).Rule))
}

// UsedConnectionCount mocks base method.
func (m *MockConnectionKepper) UsedConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UsedConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// UsedConnectionCount indicates an expected call of UsedConnectionCount.
func (mr *MockConnectionKepperMockRecorder) UsedConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsedConnectionCount", reflect.TypeOf((*MockConnectionKepper)(nil).UsedConnectionCount))
}

// MockPool is a mock of Pool interface.
type MockPool struct {
	ctrl     *gomock.Controller
	recorder *MockPoolMockRecorder
}

// MockPoolMockRecorder is the mock recorder for MockPool.
type MockPoolMockRecorder struct {
	mock *MockPool
}

// NewMockPool creates a new mock instance.
func NewMockPool(ctrl *gomock.Controller) *MockPool {
	mock := &MockPool{ctrl: ctrl}
	mock.recorder = &MockPoolMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPool) EXPECT() *MockPoolMockRecorder {
	return m.recorder
}

// Connection mocks base method.
func (m *MockPool) Connection(clid uint, shardKey kr.ShardKey) (shard.Shard, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Connection", clid, shardKey)
	ret0, _ := ret[0].(shard.Shard)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Connection indicates an expected call of Connection.
func (mr *MockPoolMockRecorder) Connection(clid, shardKey interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connection", reflect.TypeOf((*MockPool)(nil).Connection), clid, shardKey)
}

// Discard mocks base method.
func (m *MockPool) Discard(sh shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Discard", sh)
	ret0, _ := ret[0].(error)
	return ret0
}

// Discard indicates an expected call of Discard.
func (mr *MockPoolMockRecorder) Discard(sh interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockPool)(nil).Discard), sh)
}

// ForEach mocks base method.
func (m *MockPool) ForEach(cb func(shard.Shardinfo) error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ForEach", cb)
	ret0, _ := ret[0].(error)
	return ret0
}

// ForEach indicates an expected call of ForEach.
func (mr *MockPoolMockRecorder) ForEach(cb interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEach", reflect.TypeOf((*MockPool)(nil).ForEach), cb)
}

// Hostname mocks base method.
func (m *MockPool) Hostname() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Hostname")
	ret0, _ := ret[0].(string)
	return ret0
}

// Hostname indicates an expected call of Hostname.
func (mr *MockPoolMockRecorder) Hostname() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hostname", reflect.TypeOf((*MockPool)(nil).Hostname))
}

// IdleConnectionCount mocks base method.
func (m *MockPool) IdleConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IdleConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// IdleConnectionCount indicates an expected call of IdleConnectionCount.
func (mr *MockPoolMockRecorder) IdleConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdleConnectionCount", reflect.TypeOf((*MockPool)(nil).IdleConnectionCount))
}

// List mocks base method.
func (m *MockPool) List() []shard.Shard {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "List")
	ret0, _ := ret[0].([]shard.Shard)
	return ret0
}

// List indicates an expected call of List.
func (mr *MockPoolMockRecorder) List() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPool)(nil).List))
}

// Put mocks base method.
func (m *MockPool) Put(host shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Put", host)
	ret0, _ := ret[0].(error)
	return ret0
}

// Put indicates an expected call of Put.
func (mr *MockPoolMockRecorder) Put(host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockPool)(nil).Put), host)
}

// QueueResidualSize mocks base method.
func (m *MockPool) QueueResidualSize() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "QueueResidualSize")
	ret0, _ := ret[0].(int)
	return ret0
}

// QueueResidualSize indicates an expected call of QueueResidualSize.
func (mr *MockPoolMockRecorder) QueueResidualSize() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueResidualSize", reflect.TypeOf((*MockPool)(nil).QueueResidualSize))
}

// RouterName mocks base method.
func (m *MockPool) RouterName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RouterName")
	ret0, _ := ret[0].(string)
	return ret0
}

// RouterName indicates an expected call of RouterName.
func (mr *MockPoolMockRecorder) RouterName() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouterName", reflect.TypeOf((*MockPool)(nil).RouterName))
}

// Rule mocks base method.
func (m *MockPool) Rule() *config.BackendRule {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Rule")
	ret0, _ := ret[0].(*config.BackendRule)
	return ret0
}

// Rule indicates an expected call of Rule.
func (mr *MockPoolMockRecorder) Rule() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rule", reflect.TypeOf((*MockPool)(nil).Rule))
}

// UsedConnectionCount mocks base method.
func (m *MockPool) UsedConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UsedConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// UsedConnectionCount indicates an expected call of UsedConnectionCount.
func (mr *MockPoolMockRecorder) UsedConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsedConnectionCount", reflect.TypeOf((*MockPool)(nil).UsedConnectionCount))
}

// MockMultiShardPool is a mock of MultiShardPool interface.
type MockMultiShardPool struct {
	ctrl     *gomock.Controller
	recorder *MockMultiShardPoolMockRecorder
}

// MockMultiShardPoolMockRecorder is the mock recorder for MockMultiShardPool.
type MockMultiShardPoolMockRecorder struct {
	mock *MockMultiShardPool
}

// NewMockMultiShardPool creates a new mock instance.
func NewMockMultiShardPool(ctrl *gomock.Controller) *MockMultiShardPool {
	mock := &MockMultiShardPool{ctrl: ctrl}
	mock.recorder = &MockMultiShardPoolMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMultiShardPool) EXPECT() *MockMultiShardPoolMockRecorder {
	return m.recorder
}

// Connection mocks base method.
func (m *MockMultiShardPool) Connection(clid uint, shardKey kr.ShardKey, host string) (shard.Shard, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Connection", clid, shardKey, host)
	ret0, _ := ret[0].(shard.Shard)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Connection indicates an expected call of Connection.
func (mr *MockMultiShardPoolMockRecorder) Connection(clid, shardKey, host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connection", reflect.TypeOf((*MockMultiShardPool)(nil).Connection), clid, shardKey, host)
}

// Cut mocks base method.
func (m *MockMultiShardPool) Cut(host string) []shard.Shard {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Cut", host)
	ret0, _ := ret[0].([]shard.Shard)
	return ret0
}

// Cut indicates an expected call of Cut.
func (mr *MockMultiShardPoolMockRecorder) Cut(host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cut", reflect.TypeOf((*MockMultiShardPool)(nil).Cut), host)
}

// Discard mocks base method.
func (m *MockMultiShardPool) Discard(sh shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Discard", sh)
	ret0, _ := ret[0].(error)
	return ret0
}

// Discard indicates an expected call of Discard.
func (mr *MockMultiShardPoolMockRecorder) Discard(sh interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockMultiShardPool)(nil).Discard), sh)
}

// ForEach mocks base method.
func (m *MockMultiShardPool) ForEach(cb func(shard.Shardinfo) error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ForEach", cb)
	ret0, _ := ret[0].(error)
	return ret0
}

// ForEach indicates an expected call of ForEach.
func (mr *MockMultiShardPoolMockRecorder) ForEach(cb interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEach", reflect.TypeOf((*MockMultiShardPool)(nil).ForEach), cb)
}

// ForEachPool mocks base method.
func (m *MockMultiShardPool) ForEachPool(cb func(pool.Pool) error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ForEachPool", cb)
	ret0, _ := ret[0].(error)
	return ret0
}

// ForEachPool indicates an expected call of ForEachPool.
func (mr *MockMultiShardPoolMockRecorder) ForEachPool(cb interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEachPool", reflect.TypeOf((*MockMultiShardPool)(nil).ForEachPool), cb)
}

// Hostname mocks base method.
func (m *MockMultiShardPool) Hostname() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Hostname")
	ret0, _ := ret[0].(string)
	return ret0
}

// Hostname indicates an expected call of Hostname.
func (mr *MockMultiShardPoolMockRecorder) Hostname() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hostname", reflect.TypeOf((*MockMultiShardPool)(nil).Hostname))
}

// IdleConnectionCount mocks base method.
func (m *MockMultiShardPool) IdleConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IdleConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// IdleConnectionCount indicates an expected call of IdleConnectionCount.
func (mr *MockMultiShardPoolMockRecorder) IdleConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdleConnectionCount", reflect.TypeOf((*MockMultiShardPool)(nil).IdleConnectionCount))
}

// InitRule mocks base method.
func (m *MockMultiShardPool) InitRule(rule *config.BackendRule) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "InitRule", rule)
	ret0, _ := ret[0].(error)
	return ret0
}

// InitRule indicates an expected call of InitRule.
func (mr *MockMultiShardPoolMockRecorder) InitRule(rule interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitRule", reflect.TypeOf((*MockMultiShardPool)(nil).InitRule), rule)
}

// List mocks base method.
func (m *MockMultiShardPool) List() []shard.Shard {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "List")
	ret0, _ := ret[0].([]shard.Shard)
	return ret0
}

// List indicates an expected call of List.
func (mr *MockMultiShardPoolMockRecorder) List() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockMultiShardPool)(nil).List))
}

// Put mocks base method.
func (m *MockMultiShardPool) Put(host shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Put", host)
	ret0, _ := ret[0].(error)
	return ret0
}

// Put indicates an expected call of Put.
func (mr *MockMultiShardPoolMockRecorder) Put(host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockMultiShardPool)(nil).Put), host)
}

// QueueResidualSize mocks base method.
func (m *MockMultiShardPool) QueueResidualSize() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "QueueResidualSize")
	ret0, _ := ret[0].(int)
	return ret0
}

// QueueResidualSize indicates an expected call of QueueResidualSize.
func (mr *MockMultiShardPoolMockRecorder) QueueResidualSize() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueResidualSize", reflect.TypeOf((*MockMultiShardPool)(nil).QueueResidualSize))
}

// RouterName mocks base method.
func (m *MockMultiShardPool) RouterName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RouterName")
	ret0, _ := ret[0].(string)
	return ret0
}

// RouterName indicates an expected call of RouterName.
func (mr *MockMultiShardPoolMockRecorder) RouterName() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouterName", reflect.TypeOf((*MockMultiShardPool)(nil).RouterName))
}

// Rule mocks base method.
func (m *MockMultiShardPool) Rule() *config.BackendRule {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Rule")
	ret0, _ := ret[0].(*config.BackendRule)
	return ret0
}

// Rule indicates an expected call of Rule.
func (mr *MockMultiShardPoolMockRecorder) Rule() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rule", reflect.TypeOf((*MockMultiShardPool)(nil).Rule))
}

// UsedConnectionCount mocks base method.
func (m *MockMultiShardPool) UsedConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UsedConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// UsedConnectionCount indicates an expected call of UsedConnectionCount.
func (mr *MockMultiShardPoolMockRecorder) UsedConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsedConnectionCount", reflect.TypeOf((*MockMultiShardPool)(nil).UsedConnectionCount))
}

// MockPoolIterator is a mock of PoolIterator interface.
type MockPoolIterator struct {
	ctrl     *gomock.Controller
	recorder *MockPoolIteratorMockRecorder
}

// MockPoolIteratorMockRecorder is the mock recorder for MockPoolIterator.
type MockPoolIteratorMockRecorder struct {
	mock *MockPoolIterator
}

// NewMockPoolIterator creates a new mock instance.
func NewMockPoolIterator(ctrl *gomock.Controller) *MockPoolIterator {
	mock := &MockPoolIterator{ctrl: ctrl}
	mock.recorder = &MockPoolIteratorMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPoolIterator) EXPECT() *MockPoolIteratorMockRecorder {
	return m.recorder
}

// ForEachPool mocks base method.
func (m *MockPoolIterator) ForEachPool(cb func(pool.Pool) error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ForEachPool", cb)
	ret0, _ := ret[0].(error)
	return ret0
}

// ForEachPool indicates an expected call of ForEachPool.
func (mr *MockPoolIteratorMockRecorder) ForEachPool(cb interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEachPool", reflect.TypeOf((*MockPoolIterator)(nil).ForEachPool), cb)
}

// MockDBPool is a mock of DBPool interface.
type MockDBPool struct {
	ctrl     *gomock.Controller
	recorder *MockDBPoolMockRecorder
}

// MockDBPoolMockRecorder is the mock recorder for MockDBPool.
type MockDBPoolMockRecorder struct {
	mock *MockDBPool
}

// NewMockDBPool creates a new mock instance.
func NewMockDBPool(ctrl *gomock.Controller) *MockDBPool {
	mock := &MockDBPool{ctrl: ctrl}
	mock.recorder = &MockDBPoolMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDBPool) EXPECT() *MockDBPoolMockRecorder {
	return m.recorder
}

// Connection mocks base method.
func (m *MockDBPool) Connection(clid uint, shardKey kr.ShardKey, host string) (shard.Shard, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Connection", clid, shardKey, host)
	ret0, _ := ret[0].(shard.Shard)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Connection indicates an expected call of Connection.
func (mr *MockDBPoolMockRecorder) Connection(clid, shardKey, host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connection", reflect.TypeOf((*MockDBPool)(nil).Connection), clid, shardKey, host)
}

// Cut mocks base method.
func (m *MockDBPool) Cut(host string) []shard.Shard {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Cut", host)
	ret0, _ := ret[0].([]shard.Shard)
	return ret0
}

// Cut indicates an expected call of Cut.
func (mr *MockDBPoolMockRecorder) Cut(host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cut", reflect.TypeOf((*MockDBPool)(nil).Cut), host)
}

// Discard mocks base method.
func (m *MockDBPool) Discard(sh shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Discard", sh)
	ret0, _ := ret[0].(error)
	return ret0
}

// Discard indicates an expected call of Discard.
func (mr *MockDBPoolMockRecorder) Discard(sh interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockDBPool)(nil).Discard), sh)
}

// ForEach mocks base method.
func (m *MockDBPool) ForEach(cb func(shard.Shardinfo) error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ForEach", cb)
	ret0, _ := ret[0].(error)
	return ret0
}

// ForEach indicates an expected call of ForEach.
func (mr *MockDBPoolMockRecorder) ForEach(cb interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEach", reflect.TypeOf((*MockDBPool)(nil).ForEach), cb)
}

// ForEachPool mocks base method.
func (m *MockDBPool) ForEachPool(cb func(pool.Pool) error) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ForEachPool", cb)
	ret0, _ := ret[0].(error)
	return ret0
}

// ForEachPool indicates an expected call of ForEachPool.
func (mr *MockDBPoolMockRecorder) ForEachPool(cb interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForEachPool", reflect.TypeOf((*MockDBPool)(nil).ForEachPool), cb)
}

// Hostname mocks base method.
func (m *MockDBPool) Hostname() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Hostname")
	ret0, _ := ret[0].(string)
	return ret0
}

// Hostname indicates an expected call of Hostname.
func (mr *MockDBPoolMockRecorder) Hostname() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hostname", reflect.TypeOf((*MockDBPool)(nil).Hostname))
}

// IdleConnectionCount mocks base method.
func (m *MockDBPool) IdleConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IdleConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// IdleConnectionCount indicates an expected call of IdleConnectionCount.
func (mr *MockDBPoolMockRecorder) IdleConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdleConnectionCount", reflect.TypeOf((*MockDBPool)(nil).IdleConnectionCount))
}

// InitRule mocks base method.
func (m *MockDBPool) InitRule(rule *config.BackendRule) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "InitRule", rule)
	ret0, _ := ret[0].(error)
	return ret0
}

// InitRule indicates an expected call of InitRule.
func (mr *MockDBPoolMockRecorder) InitRule(rule interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitRule", reflect.TypeOf((*MockDBPool)(nil).InitRule), rule)
}

// List mocks base method.
func (m *MockDBPool) List() []shard.Shard {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "List")
	ret0, _ := ret[0].([]shard.Shard)
	return ret0
}

// List indicates an expected call of List.
func (mr *MockDBPoolMockRecorder) List() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockDBPool)(nil).List))
}

// Put mocks base method.
func (m *MockDBPool) Put(host shard.Shard) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Put", host)
	ret0, _ := ret[0].(error)
	return ret0
}

// Put indicates an expected call of Put.
func (mr *MockDBPoolMockRecorder) Put(host interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockDBPool)(nil).Put), host)
}

// QueueResidualSize mocks base method.
func (m *MockDBPool) QueueResidualSize() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "QueueResidualSize")
	ret0, _ := ret[0].(int)
	return ret0
}

// QueueResidualSize indicates an expected call of QueueResidualSize.
func (mr *MockDBPoolMockRecorder) QueueResidualSize() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueResidualSize", reflect.TypeOf((*MockDBPool)(nil).QueueResidualSize))
}

// RouterName mocks base method.
func (m *MockDBPool) RouterName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RouterName")
	ret0, _ := ret[0].(string)
	return ret0
}

// RouterName indicates an expected call of RouterName.
func (mr *MockDBPoolMockRecorder) RouterName() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouterName", reflect.TypeOf((*MockDBPool)(nil).RouterName))
}

// Rule mocks base method.
func (m *MockDBPool) Rule() *config.BackendRule {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Rule")
	ret0, _ := ret[0].(*config.BackendRule)
	return ret0
}

// Rule indicates an expected call of Rule.
func (mr *MockDBPoolMockRecorder) Rule() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rule", reflect.TypeOf((*MockDBPool)(nil).Rule))
}

// ShardMapping mocks base method.
func (m *MockDBPool) ShardMapping() map[string]*config.Shard {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ShardMapping")
	ret0, _ := ret[0].(map[string]*config.Shard)
	return ret0
}

// ShardMapping indicates an expected call of ShardMapping.
func (mr *MockDBPoolMockRecorder) ShardMapping() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardMapping", reflect.TypeOf((*MockDBPool)(nil).ShardMapping))
}

// UsedConnectionCount mocks base method.
func (m *MockDBPool) UsedConnectionCount() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UsedConnectionCount")
	ret0, _ := ret[0].(int)
	return ret0
}

// UsedConnectionCount indicates an expected call of UsedConnectionCount.
func (mr *MockDBPoolMockRecorder) UsedConnectionCount() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsedConnectionCount", reflect.TypeOf((*MockDBPool)(nil).UsedConnectionCount))
}
